package client.functionalities;

public abstract class LocalFunctionality implements Runnable {
	private Thread thread;
	private boolean running;
	
	public LocalFunctionality() {
		this.running = false;
	}
	
	public synchronized void start() {
		this.running = true;
		this.thread = new Thread(this);
		this.thread.start();
	}
	
	public synchronized void stop() {
		this.running = false;
	}
	
	public abstract void run();
	
	public boolean isRunning() { return this.running; }
	

}
